<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>管理首页</title>
<link rel="stylesheet" href="/static/admin/css/page_navigation.css" type="text/css">
</head>
<body>
<?php include APP_ADMIN_VIEW . 'include/head.php';?>
<!-- Table goes in the document BODY -->
<table>
    <tr>
        <td>

<table class="data_list">
<tr>
    <td colspan="4">
        点击最多的文章
    </td>
</tr>
<tr>
    <th>编号</th><th>标题</th><th>阅读数</th><th>评论数</th>
</tr>
<?php if ($post_array): ?>
<?php foreach ($post_array as $post_data): ?>
<tr>
    <td width="5%"><?php echo $post_data['id']; ?></td>
    <td width="20%">
        <a href="<?php echo isset($post_data['url']) ? $post_data['url'] : ''; ?>" target="_blank">
        <?php echo isset($post_data['title']) ? $post_data['title'] : ''; ?>
        </a>

        </td>
    <td width="5%"><?php echo isset($post_data['page_view_count']) ? $post_data['page_view_count'] : ''; ?></td>
    <td width="5%"><?php echo isset($post_data['comment_count']) ? $post_data['comment_count'] : ''; ?></td>
</tr>
<?php endforeach?>
<?php else: ?>
<tr>
    <td colspan="5">暂无数据</td>
</tr>
<?php endif?>
</table>

        </td>
        <td>
<table class="data_list">
<tr>
    <td colspan="4">
        评论最多的文章
    </td>
</tr>
<tr>
    <th>编号</th><th>标题</th><th>阅读数</th><th>评论数</th>
</tr>
<?php if ($post_comment_array): ?>
<?php foreach ($post_comment_array as $post_data): ?>
<tr>
    <td width="5%"><?php echo $post_data['id']; ?></td>
    <td width="20%">
        <a href="<?php echo isset($post_data['url']) ? $post_data['url'] : ''; ?>" target="_blank">
        <?php echo isset($post_data['title']) ? $post_data['title'] : ''; ?>
        </a>

        </td>
    <td width="5%"><?php echo isset($post_data['page_view_count']) ? $post_data['page_view_count'] : ''; ?></td>
    <td width="5%"><?php echo isset($post_data['comment_count']) ? $post_data['comment_count'] : ''; ?></td>
</tr>
<?php endforeach?>
<?php else: ?>
<tr>
    <td colspan="4">暂无数据</td>
</tr>
<?php endif?>
</table>
        </td>
    </tr>
</table>

<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<?php include APP_ADMIN_VIEW . 'include/foot.php';?>
</body>
</html>